namespace Northwind.Domain.Core.Entities
{
    using System;
    using System.ComponentModel.DataAnnotations;

    public class AuditPropertyTrail : IEntity
    {
        public AuditPropertyTrail()
        {
            this.ModifiedDate = DateTime.Now;
            this.ModifiedBy = CurrentPrincipalHelper.Name;
        }

        public int Id { get; set; }

        public int EntityId { get; set; }

        [MaxLength(128)]
        [Required]
        public string EntityType { get; set; }

        [MaxLength(128)]
        [Required]
        public string PropertyName { get; set; }

        [MaxLength(128)]
        [Required]
        public string ModifiedBy { get; set; }

        [MaxLength(128)]
        [Required]
        public string OldValue { get; set; }

        [MaxLength(128)]
        [Required]
        public string NewValue { get; set; }

        public DateTime ModifiedDate { get; set; }
    }
}
